<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
今天是第<span id="s"></span>天
<input type="button" name="box" value="点击" id="btn">
<script>
    var sobj = document.getElementById('s');
    var btnobj = document.getElementById('btn');
    var i = 0;
    btnobj.onclick = function () {
        i++;
        console.log(i);
        history.pushState({j:i},null);
        s.innerHTML = i
    }

</script>
</body>
</html>